package com.zbkj.dal.entity.order;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 锁定额度记录表
 * </p>
 *
 * @author jhui
 * @since 2023-09-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ba_user_dues_record")
public class UserDuesRecord implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户uid
     */
    private Integer uid;

    /**
     * 关联id(订单号、充值单号)(system默认为0）
     */
    private String linkId;

    /**
     * 关联类型:dues-充值,system-系统,brokerage-佣金转额度
     */
    private String linkType;

    /**
     * 类型：1-增加，2-扣减
     */
    private Integer type;

    /**
     * 额度
     */
    private BigDecimal amount;

    /**
     * 剩余额度
     */
    private BigDecimal balance;

    /**
     * 信用额度
     */
    private BigDecimal creditAmount;

    /**
     * 剩余信用额度
     */
    private BigDecimal creditBalance;

    /**
     * 备注
     */
    private String remark;

    /**
     * 添加时间
     */
    private LocalDateTime createTime;


}
